package com.itheima.controller;

import com.itheima.client.BrandClient;
import com.itheima.client.SmsHomeAdvertiseClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/home")
public class HomeController {

    @Autowired
    private BrandClient brandClient;

    @Autowired
    private SmsHomeAdvertiseClient smsHomeAdvertiseClient;

    /**
     * 首页内容信息展示
     *
     * @return
     */
   /* @GetMapping("/content")
    public AjaxResult content() {
        Map<String, Object> map = new HashMap<>();
        map.put("advertiseList", smsHomeAdvertiseClient.listAll().get("data"));
        map.put("brandList", brandClient.listAllBrand().get("data"));
        map.put("homeFlashPromotion", brandClient.listAllBrand().get("data"));
        map.put("hotProductList", brandClient.listAllBrand().get("data"));
        map.put("newProductList", brandClient.listAllBrand().get("data"));
        map.put("subjectList", brandClient.listAllBrand().get("data"));
        return AjaxResult.success(map);
    }*/
}
